package com.photopreview

import android.content.Context
import android.util.TypedValue

object Constants{
    //圆点
    const val INDICATOR_TYPE_DOT = "INDICATOR_TYPE_DOT"
    //文本1/8
    const val INDICATOR_TYPE_TEXT = "INDICATOR_TYPE_TEXT"

    //dp转px
    fun dp2px(context: Context, dipValue: Int): Int {
        return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
                dipValue.toFloat(), context.resources.displayMetrics).toInt()
    }

}
